<template>

  <div class="detail-stat">
    <div class="detail-stat-l">
      <div class="detail-stat-rating flex-c">
        <div class="rating-score">{{ rankAvg }}</div>
        <div class="rating-star">
          <van-rate
            :value="rankAvg * 5 /10"
            color="#717882"
            size="16"
            void-icon="star"
            void-color="#DEE0E2"
            readonly
            allow-half
          ></van-rate>
        </div>
      </div>
      <div class="rating-num">{{ rankNum }}<span class="rate-text">人点评</span></div>
    </div>
    <div class="detail-stat-r">
      <div class="detail-stat-reading">
        <div class="reading-num">{{ readerNum }}<span class="rate-text">人在此读书</span></div>
      </div>
      <div class="reading-person">
        <div class="person-img" v-for="(pre,index) in readers" :key="index">
          <ImageView
            round
            :src="pre.avatarUrl || ''"
          ></ImageView>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import ImageView from "../base/ImageView.vue";

  export default {
    name: "DetailStat",
    data(){
      return{

      }
    },
    props: {
      readers: [],
      readerNum: 0,
      rankNum: 0,
      rankAvg: 0,
    },
    computed : {

    },
    mounted(){

    },
    components: {
      ImageView
    }
  };
</script>

<style lang="less" scoped>

  .detail-stat {
    display: flex;
    justify-content: space-between;
    padding: 0 21px;
    .detail-stat-l {
      /*margin-right: 45px;*/
      .detail-stat-rating {
        .rating-score {
          font-size: 24px;
          color: #5E5E5E;
          line-height: 33.5px;
          margin-right: 7.5px;
        }
        .rating-star {
          display: flex;
        }
      }
      .rating-num {
        font-size: 11px;
        color: #99A0AA;
        line-height: 28px;
      }
    }
    .detail-stat-r {
      .detail-stat-reading {
        display: flex;
        .reading-num {
          font-size: 24px;
          color: #5E5E5E;
          line-height: 33.5px;
        }
      }
      .reading-person {
        display: flex;
        .person-img {
          width: 20px;
          height: 20px;
          border: 1px solid rgba(255, 255, 255, 0.50);
          box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.20);
          border-radius: 50%;
          margin-right: -4.5px;
        }
      }
    }
  }

  .flex-c{
    display: flex;
    align-items: center;
  }
  .rate-text {
    margin-left: 7.5px;
    font-size: 11px;
    color: #99A0AA;
    line-height: 28px;
  }
</style>
